package com.acminds.acuteauto.persistence.entities;

// Generated May 13, 2012 8:21:43 PM by Hibernate Tools 3.4.0.CR1

import java.util.Date;
import java.util.ArrayList;
import java.util.List;
import javax.persistence.Column;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.MappedSuperclass;
import javax.persistence.OneToMany;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import com.acminds.acuteauto.persistence.dto.*;

/**
 * Applicant generated by customhbm2java
 */
@MappedSuperclass
public abstract class AbstractApplicant extends
		com.acminds.acuteauto.persistence.BaseDTO implements
		java.io.Serializable {

	private static final long serialVersionUID = 1L;

	private Integer applicantId;
	private LoanApplication loanApplication;
	private String firstName;
	private String middleName;
	private String lastName;
	private Date dateOfBirth;
	private int ssn;
	private String dmvLicenseNum;
	private String licenseState;
	private Date licenseExpiry;
	private List<Residence> residences = new ArrayList<Residence>(0);
	private List<Employment> employments = new ArrayList<Employment>(0);
	private List<Account> accounts = new ArrayList<Account>(0);

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "APPLICANT_ID", unique = true, nullable = false)
	public Integer getApplicantId() {
		return this.applicantId;
	}

	public void setApplicantId(Integer applicantId) {
		this.applicantId = applicantId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "LOAN_APPLICATION_ID", nullable = false)
	public LoanApplication getLoanApplication() {
		return this.loanApplication;
	}

	public void setLoanApplication(LoanApplication loanApplication) {
		this.loanApplication = loanApplication;
	}

	@Column(name = "FIRST_NAME", nullable = false, length = 60)
	public String getFirstName() {
		return this.firstName;
	}

	public void setFirstName(String firstName) {
		this.firstName = firstName;
	}

	@Column(name = "MIDDLE_NAME", length = 60)
	public String getMiddleName() {
		return this.middleName;
	}

	public void setMiddleName(String middleName) {
		this.middleName = middleName;
	}

	@Column(name = "LAST_NAME", nullable = false, length = 60)
	public String getLastName() {
		return this.lastName;
	}

	public void setLastName(String lastName) {
		this.lastName = lastName;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "DATE_OF_BIRTH", nullable = false, length = 10)
	public Date getDateOfBirth() {
		return this.dateOfBirth;
	}

	public void setDateOfBirth(Date dateOfBirth) {
		this.dateOfBirth = dateOfBirth;
	}

	@Column(name = "SSN", nullable = false)
	public int getSsn() {
		return this.ssn;
	}

	public void setSsn(int ssn) {
		this.ssn = ssn;
	}

	@Column(name = "DMV_LICENSE_NUM", length = 15)
	public String getDmvLicenseNum() {
		return this.dmvLicenseNum;
	}

	public void setDmvLicenseNum(String dmvLicenseNum) {
		this.dmvLicenseNum = dmvLicenseNum;
	}

	@Column(name = "LICENSE_STATE", length = 2)
	public String getLicenseState() {
		return this.licenseState;
	}

	public void setLicenseState(String licenseState) {
		this.licenseState = licenseState;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "LICENSE_EXPIRY", length = 10)
	public Date getLicenseExpiry() {
		return this.licenseExpiry;
	}

	public void setLicenseExpiry(Date licenseExpiry) {
		this.licenseExpiry = licenseExpiry;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "applicant")
	public List<Residence> getResidences() {
		return this.residences;
	}

	public void setResidences(List<Residence> residences) {
		this.residences = residences;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "applicant")
	public List<Employment> getEmployments() {
		return this.employments;
	}

	public void setEmployments(List<Employment> employments) {
		this.employments = employments;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "applicant")
	public List<Account> getAccounts() {
		return this.accounts;
	}

	public void setAccounts(List<Account> accounts) {
		this.accounts = accounts;
	}

}
